package kite.sso.message;

import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 功能描述: <br>
 * 所属包名: kite.sso.message<br>
 * 创建人　: 白剑<br>
 * 创建时间: 2018/06/08 14:12:49<br>
 * 当前版本: 1.0<br>
 * 修改历史: <br>
 * 修改时间　　　　　修改人　　　　　版本变更　　　　　修改说明<br>
 * -----------------------------------------------------<br>
 * <br>
 */
public class Response implements Serializable {

    private String retCode;

    private int code;

    private int count;

    private Object data;

    private String msg;

    private boolean isSuccess = false;

    private Object refObj;

    private Object vo;

    private Object vo1;

    private Object pager;

    private String result = "";

    private Map<String, Object> resultsMap = new HashMap<>();

    public String getRetCode() {
        return retCode;
    }

    public void setRetCode(String retCode) {
        this.retCode = retCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean isSuccess) {
        this.isSuccess = isSuccess;
    }

    public Object getRefObj() {
        return refObj;
    }

    public void setRefObj(Object refObj) {
        this.refObj = refObj;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Map<String, Object> getResultsMap() {
        return resultsMap;
    }

    public void setResultsMap(Map<String, Object> resultsMap) {
        this.resultsMap = resultsMap;
    }

    public Object getVo() {
        return vo;
    }

    public void setVo(Object vo) {
        this.vo = vo;
    }

    public Object getVo1() {
        return vo1;
    }

    public void setVo1(Object vo1) {
        this.vo1 = vo1;
    }

    public Object getPager() {
        return pager;
    }

    public void setPager(Object pager) {
        this.pager = pager;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String responseVal() {
        this.code = this.isSuccess ? 0 : 1;
        return JSONObject.toJSONString(this, new JsonValFilter());
    }

}
